import {existsSync, promises} from 'fs';
import {isString} from 'lodash';

const checkFile = async (path: string) => {
    if (!isString(path)) return;

    if (!existsSync(path)) {
        return promises.mkdir(path, {recursive: true});
    }
};

export default checkFile;
